package cn.edu.scut.sys.vo;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.edu.scut.sys.json.CustomTimestampSerializer;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * ShootScore entity. @author MyEclipse Persistence Tools
 */

@Entity
@Table(name = "shoot_score", catalog = "scoredb")
@JsonIgnoreProperties(value={"hibernateLazyInitializer"}) 
public class ShootScore implements java.io.Serializable {

	private static final long serialVersionUID = 5976756847766395274L;

	// Fields

	private Long id;
	private Leader leader;
	private Student student;
	private Timestamp trainDate;
	private Integer totalTime;
	private Integer stopTime1;
	private Double leapDistance1;
	private Integer stopTime2;
	private Double leapDistance2;
	private Integer stopTime3;
	private Double leapDistance3;
	private Integer stopTime4;
	private Double leapDistance4;
	private Integer fixHit;
	private Integer moveHit;
	private Integer gunHit;
	private Integer score;
	private Integer reserve;

	// Constructors

	/** default constructor */
	public ShootScore() {
	}

	/** full constructor */
	public ShootScore(Leader leader, Student student, Timestamp trainDate,
			Integer totalTime, Integer stopTime1, Double leapDistance1,
			Integer stopTime2, Double leapDistance2, Integer stopTime3,
			Double leapDistance3, Integer stopTime4, Double leapDistance4,
			Integer fixHit, Integer moveHit, Integer gunHit, Integer score,
			Integer reserve) {
		this.leader = leader;
		this.student = student;
		this.trainDate = trainDate;
		this.totalTime = totalTime;
		this.stopTime1 = stopTime1;
		this.leapDistance1 = leapDistance1;
		this.stopTime2 = stopTime2;
		this.leapDistance2 = leapDistance2;
		this.stopTime3 = stopTime3;
		this.leapDistance3 = leapDistance3;
		this.stopTime4 = stopTime4;
		this.leapDistance4 = leapDistance4;
		this.fixHit = fixHit;
		this.moveHit = moveHit;
		this.gunHit = gunHit;
		this.score = score;
		this.reserve = reserve;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "leaderId")
	public Leader getLeader() {
		return this.leader;
	}

	public void setLeader(Leader leader) {
		this.leader = leader;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "studentId")
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "trainDate", length = 19)
	@JsonSerialize(using=CustomTimestampSerializer.class)
	public Timestamp getTrainDate() {
		return this.trainDate;
	}

	public void setTrainDate(Timestamp trainDate) {
		this.trainDate = trainDate;
	}

	@Column(name = "totalTime")
	public Integer getTotalTime() {
		return this.totalTime;
	}

	public void setTotalTime(Integer totalTime) {
		this.totalTime = totalTime;
	}

	@Column(name = "stopTime1")
	public Integer getStopTime1() {
		return this.stopTime1;
	}

	public void setStopTime1(Integer stopTime1) {
		this.stopTime1 = stopTime1;
	}

	@Column(name = "leapDistance1", precision = 11, scale = 0)
	public Double getLeapDistance1() {
		return this.leapDistance1;
	}

	public void setLeapDistance1(Double leapDistance1) {
		this.leapDistance1 = leapDistance1;
	}

	@Column(name = "stopTime2")
	public Integer getStopTime2() {
		return this.stopTime2;
	}

	public void setStopTime2(Integer stopTime2) {
		this.stopTime2 = stopTime2;
	}

	@Column(name = "leapDistance2", precision = 11, scale = 0)
	public Double getLeapDistance2() {
		return this.leapDistance2;
	}

	public void setLeapDistance2(Double leapDistance2) {
		this.leapDistance2 = leapDistance2;
	}

	@Column(name = "stopTime3")
	public Integer getStopTime3() {
		return this.stopTime3;
	}

	public void setStopTime3(Integer stopTime3) {
		this.stopTime3 = stopTime3;
	}

	@Column(name = "leapDistance3", precision = 11, scale = 0)
	public Double getLeapDistance3() {
		return this.leapDistance3;
	}

	public void setLeapDistance3(Double leapDistance3) {
		this.leapDistance3 = leapDistance3;
	}

	@Column(name = "stopTime4")
	public Integer getStopTime4() {
		return this.stopTime4;
	}

	public void setStopTime4(Integer stopTime4) {
		this.stopTime4 = stopTime4;
	}

	@Column(name = "leapDistance4", precision = 11, scale = 0)
	public Double getLeapDistance4() {
		return this.leapDistance4;
	}

	public void setLeapDistance4(Double leapDistance4) {
		this.leapDistance4 = leapDistance4;
	}

	@Column(name = "fixHit")
	public Integer getFixHit() {
		return this.fixHit;
	}

	public void setFixHit(Integer fixHit) {
		this.fixHit = fixHit;
	}

	@Column(name = "moveHit")
	public Integer getMoveHit() {
		return this.moveHit;
	}

	public void setMoveHit(Integer moveHit) {
		this.moveHit = moveHit;
	}

	@Column(name = "gunHit")
	public Integer getGunHit() {
		return this.gunHit;
	}

	public void setGunHit(Integer gunHit) {
		this.gunHit = gunHit;
	}

	@Column(name = "score")
	public Integer getScore() {
		return this.score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	@Column(name = "reserve")
	public Integer getReserve() {
		return this.reserve;
	}

	public void setReserve(Integer reserve) {
		this.reserve = reserve;
	}

}